-- GENERATED SPELL FOR [The Duke of Cynders] --


function spell0_15206(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(22424,pUnit)
pUnit:RegisterEvent('Sorts_15206', 6254, 1)
end

function spell1_15206(pUnit, Event) --@Elemental Spawn-in,Self--
pUnit:FullCastSpellOnTarget(25035,pUnit)
pUnit:RegisterEvent('Sorts_15206', 685, 1)
end

function spell2_15206(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(25028,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15206', 582, 1)
end

function spell3_15206(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(18399,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15206', 11000, 1)
end

function Sorts_15206(pUnit, Event)
local choix_sorts_15206 = math.random(0, 3)
if choix_sorts_15206 == 0 then
pUnit:RegisterEvent('spell0_15206', 1, 1)
end
if choix_sorts_15206 == 1 then
pUnit:RegisterEvent('spell1_15206', 1, 1)
end
if choix_sorts_15206 == 2 then
pUnit:RegisterEvent('spell2_15206', 1, 1)
end
if choix_sorts_15206 == 3 then
pUnit:RegisterEvent('spell3_15206', 1, 1)
end
end

function mob15206_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15206', math.random(1500, 3000), 1)
end

function mob15206_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15206_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15206_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15206, 1, 'mob15206_Action')
RegisterUnitEvent(15206, 2, 'mob15206_Leave')
RegisterUnitEvent(15206, 3, 'mob15206_Kill')
RegisterUnitEvent(15206, 4, 'mob15206_Die')
